import Vue from 'vue'
import App from './App'
import store from './store'
import { post, get } from './utils/async'

Vue.config.productionTip = false
App.mpType = 'app'

Vue.prototype.$store = store
Vue.prototype.$post = post
Vue.prototype.$get = get

const app = new Vue(App)
app.$mount()

export default {
  // 这个字段走 app.json
  config: {
    // 页面前带有 ^ 符号的，会被编译成首页，其他页面可以选填，我们会自动把 webpack entry 里面的入口页面加进去
    pages: [
      '^pages/index/main'
    ],
    window: {
      backgroundTextStyle: 'dark',
      // navigationBarBackgroundColor: '#f00',
      navigationBarBackgroundColor: '#1c1c1c',
      navigationBarTitleText: 'WeChat',
      navigationBarTextStyle: 'white',
      // 是否开启下拉刷新
      enablePullDownRefresh: false
    },
    tabBar: {
      backgroundColor: '#fff',
      selectColor: '#00CCCC',
      selectedColor: '#22ac38',
      borderStyle: '#ccc',
      list: [
        {
          text: '首页',
          pagePath: 'pages/index/main',
          iconPath: 'static/images/index.png',
          selectedIconPath: 'static/images/indexG.png'
        },
        {
          text: '商品',
          pagePath: 'pages/commodity/main',
          iconPath: '/static/images/commodity.png',
          selectedIconPath: '/static/images/commodityG.png'
        },
        {
          text: '购物车',
          pagePath: 'pages/cart/main',
          iconPath: '/static/images/cart.png',
          selectedIconPath: '/static/images/cartG.png'
        },
        {
          text: '我的',
          pagePath: 'pages/my/main',
          iconPath: '/static/images/my.png',
          selectedIconPath: '/static/images/myG.png'
        }
      ]
    }
  }
}
